package com.dormitory_springboot.controller;

import com.dormitory_springboot.form.*;
import com.dormitory_springboot.service.AdminService;
import com.dormitory_springboot.vo.ResultVO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;

/**
 * @auther 夏杨
 **/
@RestController
@RequestMapping("/admin")
public class AdminController {
    @Autowired
    AdminService adminService;
    @GetMapping("/login")
    public ResultVO login(RuleForm ruleForm){
        return adminService.login(ruleForm);
    }
    @GetMapping("/check")
    public List<Integer> check(){
        return adminService.check();
    }
    @GetMapping("/adddormitory")
    public boolean adddormitory(Form form){
        return adminService.adddormitory(form);
    }
}